]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
extensionUtils: Remove installImporter()
authorFlorian Müllner <fmuellner@gnome.org>
Thu, 8 Jun 2023 16:36:48 +0000 (18:36 +0200)
committerMarge Bot <marge-bot@gnome.org>
Thu, 6 Jul 2023 18:41:29 +0000 (18:41 +0000)
The method is now unused, so remove it.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2795>

js/misc/extensionUtils.js

index 9df1f858a284a7c06694bcb28581f9ff1ee74e8a..df43d9825775fe966db1dfd32f28856dd5dc591b 100644 (file)
@@ -1,7 +1,7 @@
 // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
 /* exported ExtensionState, ExtensionType, getCurrentExtension,
    getSettings, initTranslations, gettext, ngettext, pgettext,
-   openPrefs, isOutOfDate, installImporter, serializeExtension,
+   openPrefs, isOutOfDate, serializeExtension,
    deserializeExtension, setCurrentExtension */
 
 // Common utils for the extension system and the extension
@@ -310,12 +310,3 @@ function deserializeExtension(variant) {
     res.dir = Gio.File.new_for_path(res.path);
     return res;
 }
-
-function installImporter(extension) {
-    let oldSearchPath = imports.searchPath.slice();  // make a copy
-    imports.searchPath = [extension.dir.get_parent().get_path()];
-    // importing a "subdir" creates a new importer object that doesn't affect
-    // the global one
-    extension.imports = imports[extension.uuid];
-    imports.searchPath = oldSearchPath;
-}